﻿using WebHome_API.Models.DBModels;

namespace WebHome_API.Models.DataModels
{
    public class MessageList
    {
        public List<Messages_Table> Data { get; set; }

        public PageBase<Messages_Table> Page { get; set; }


        public MessageList(List<Messages_Table> list, int page, int perPage)
        {
            var cur = list.Skip((page - 1) * perPage).Take(perPage).ToList();
            this.Page = new(list, page, perPage);
            this.Data = cur;
        }
    }

}
